package com.shrct.businessprocess.project.events;

import com.shrct.businessprocess.project.RCProject;
import com.shrct.businessprocess.project.events.RCProjectEventsListener;
import edu.fudan.mylang.pf.event.EntityEventsManager;
import java.util.Collection;
import java.util.Date;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service("com.shrct.businessprocess.project.events.RCProjectEventsManager")
public class RCProjectEventsManager extends EntityEventsManager<RCProject> {
  @Autowired(required = false)
  private Collection<RCProjectEventsListener> listeners = com.google.common.collect.Lists.newArrayList();;
  
  protected Collection<RCProjectEventsListener> getListeners() {
    return listeners;
  }
  
  public void fireActUpdateTimer(final RCProject entity) {
    for (edu.fudan.mylang.pf.event.IEntityEventsListner<?> listener : listeners) {
    	((RCProjectEventsListener)listener).actUpdateTimer(entity);
    }
    
  }
  
  public void fireActFixTimer(final RCProject entity) {
    for (edu.fudan.mylang.pf.event.IEntityEventsListner<?> listener : listeners) {
    	((RCProjectEventsListener)listener).actFixTimer(entity);
    }
    
  }
  
  public void fireProjectAuditPassed(final RCProject entity) {
    for (edu.fudan.mylang.pf.event.IEntityEventsListner<?> listener : listeners) {
    	((RCProjectEventsListener)listener).ProjectAuditPassed(entity);
    }
    
  }
  
  public void fireContractSigned(final RCProject entity, final Date contractDate) {
    for (edu.fudan.mylang.pf.event.IEntityEventsListner<?> listener : listeners) {
    	((RCProjectEventsListener)listener).ContractSigned(entity,contractDate);
    }
    
  }
  
  public void fireNotifyAllContractCollected(final RCProject entity) {
    for (edu.fudan.mylang.pf.event.IEntityEventsListner<?> listener : listeners) {
    	((RCProjectEventsListener)listener).NotifyAllContractCollected(entity);
    }
    
  }
}
